<template>
    <div class="bac">
      <div class="l_r">
        <div class="l_r_navbar">
          <router-link replace class="l_r_item" to="/l_r/login" active-class="active" id="login"><span>登录</span></router-link>
          <router-link replace class="l_r_item" to="/l_r/register" active-class="active"><span>注冊</span></router-link>
        </div>
        <!-- 路由展示 -->
        <router-view></router-view>
      </div>
    </div>
  
</template>

<script>
export default {
    name: 'l_r',
    components:{
      
    },
    // methods: {
    //     registerClick(){
    //         this.$router.replace(this.path)
    //     },
    //     postClick() {
    //         this.$router.replace(this.path)
    //     }
    // },
}
</script>

<style>
  .bac{
    height: 100vh;
    background:url(assets/img/l_r/l_r.png) no-repeat;
    background-size: 100vw 100vh;
    width: 100vw;
  }

  /* 登录注册盒子样式 */
  .l_r {
    height: 60vh;
    background-color: white;
    border-radius: 3%;
    border: 1px solid #888888;
    box-shadow: 3px 3px 2px #888888;
    position: absolute;
    top: 213.44px;
    left: 33.75px;
    right: 33.75px;
  }

  .l_r_navbar{
    display: flex;
  }

  /* 登录注册切换栏样式 */
  .l_r_item{
    flex: 1;
    text-align: center;
    font-size: 20px;
    color: #888888;
    margin-top: 30px;
  }
  .active {
    color: var(--color-tint);
  }

/* 登录注册切换栏字样式 */
  .active span{
    position: relative;
  }

/* 下划线样式 */
  .active span::after {
    content: '';
    display: block;
    position: absolute;
    width: 90%;
    height: 3px;
    background-color: var(--color-tint);
    bottom: -8px;
    left: 5%;
  }
 
</style>